﻿<DockPanel x:Class="DevControlLibrary.UI.GridViewControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
            Name="数据源" 
            xmlns:s="clr-namespace:WpfLoadingLibrary;assembly=WpfLoadingLibrary"
           xmlns:dxb="clr-namespace:DevExpress.Xpf.Bars;assembly=DevExpress.Xpf.Core.v12.1" 
           xmlns:dxg="clr-namespace:DevExpress.Xpf.Grid;assembly=DevExpress.Xpf.Grid.v12.1" 
           xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
   
     <dxb:BarManager Name="barManager1">
        <dxb:BarManager.Items>
            <dxb:BarButtonItem Name="btnExcept" Content="导出数据"  Glyph="/QueryResource;component/Images/ConvertExcel.png" BarItemDisplayMode="ContentAndGlyph" Command="{Binding ViewModel.ExceptToExcelCommand}" />
            <dxb:BarButtonItem Name="btnExceptSQL" Content="导出SQL"  Glyph="/QueryResource;component/Images/Except_16x16.png" BarItemDisplayMode="ContentAndGlyph" Command="{Binding ViewModel.ExceptToSqlCommand}" />
            <dxb:BarButtonItem Name="btnCanel" Content="取消加载" IsVisible="{Binding ViewModel.IsAllowCanelLoad}" Command="{Binding ViewModel.CanelLoadDataCommand}"/>
            <dxb:BarButtonItem Name="btnSave" Content="{Binding ViewModel.SaveContent}" IsVisible="{Binding ViewModel.IsAllowEdit}" Command="{Binding ViewModel.SaveCommand}"/>

            <dxb:BarEditItem  Name="lbTime" Content="{Binding ViewModel.ExecTime}"  Alignment="Far"/>
            <dxb:BarEditItem  Name="lbCount" Content="{Binding ViewModel.DataCount}" Alignment="Far" />
        </dxb:BarManager.Items>
        <dxb:BarManager.Bars>
            <dxb:Bar IsStatusBar="True" Name="statusBar">
                <dxb:Bar.DockInfo>
                    <dxb:BarDockInfo ContainerType="Bottom" />
                </dxb:Bar.DockInfo>
                <dxb:Bar.ItemLinks>
                    <dxb:BarButtonItemLink  BarItemName="btnExcept"/>
                    <dxb:BarButtonItemLink  BarItemName="btnExceptSQL" />
                    <dxb:BarButtonItemLink BarItemName="btnCanel"/>
                    <dxb:BarButtonItemLink BarItemName="btnSave" />
                    <dxb:BarEditItemLink   BarItemName="lbTime" />
                    <dxb:BarEditItemLink   BarItemName="lbCount" />
                </dxb:Bar.ItemLinks>
            </dxb:Bar>
        </dxb:BarManager.Bars>
       
        <Grid>
            <s:BusyIndicator x:Name="busyCtrl" Text="{Binding ViewModel.LoadText,Mode=TwoWay}" IsBusy="{Binding ViewModel.IsBusy}" />
            <dxg:GridControl Name="gridControl1">
                <dxg:GridControl.View>
                    <dxg:TableView Name="tableView1" ShowGroupPanel="False" ShowAutoFilterRow="True" WaitIndicatorType="Panel" MultiSelectMode="Row"/>
                </dxg:GridControl.View>
            </dxg:GridControl>
        </Grid>
    </dxb:BarManager>
   
</DockPanel>
